// TypeScript file
class Textdemo extends egret.DisplayObjectContainer{
    public constructor(){
        super();
        var x = 1;
        if(x==1){
            this.text();
        }
    }
    private text(){
        var label = new egret.TextField();
        label.x = 300;
        label.text = "12345";
        label.textColor = 0x000000;
        label.background = true;
        label.backgroundColor = 0xff0000;
        label.displayAsPassword = true;
        label.size = 100;
        label.border = true;
        label.borderColor = 0x0000ff;
        this.addChild(label);
    }
}